//
//  MeatMapFooter.m
//  PigMarket
//
//  Created by 张敬 on 2019/8/2.
//  Copyright © 2019年 pigmarket.oc. All rights reserved.
//

#import "MeatMapFooter.h"

@implementation MeatMapFooter

#pragma mark - lifecycle methods

- (void)setupUI
{
    [self addSubview:self.arrowIcon];
    [self addSubview:self.moreLab];
    
    self.line.hidden = NO;
    UIBezierPath *path = [UIBezierPath bezierPathWithRect:CGRectMake(15, 0, KScreenWidth - 15, 0.5)];
    self.line.path = path.CGPath;
    [self.layer addSublayer:self.line];
}


- (void)setupLayout
{
    self.height = 44;
    
    {
        _moreLab.size = CGSizeMake(KScreenWidth - 44*2, 44);
        _moreLab.mj_y = 0;
        _moreLab.mj_x = 15;
    }
    
    {
        _arrowIcon.size = CGSizeMake(44, 44);
        _arrowIcon.mj_x = KScreenWidth - _arrowIcon.width;
        _arrowIcon.mj_y = 0;
    }
}

#pragma mark - setter methods

#pragma mark - getter methods

- (UIImageView *)arrowIcon{
    
    if (!_arrowIcon) {
        _arrowIcon = [UIImageView makeImageByImageName:@"meat_cart_enter" cornerRadius:0];
    }
    return _arrowIcon;
}


- (UILabel *)moreLab{
    
    if (!_moreLab) {
        _moreLab = [UILabel makeLabelWithText:@"更多地址" textColor:UIColorFromRGB(0x454545) font:mFont(14) textAliment:0];
    }
    return _moreLab;
}

@end
